<template>
	<view class="page" :style="{'min-height':h+'px'}">
		<c-nav-bar title="打卡详情"></c-nav-bar>
		<view class="content" :style="{'margin-top':mt+'px'}">
			<view class="lunbo">
				<u-swiper :list="picList" @change="e => current = e.current" :autoplay="false" :circular="true"
					indicatorStyle="right: 20px" height="480rpx">
					<view slot="indicator" class="indicator-num">
						<text class="indicator-num__text">{{ current + 1 }}/{{ picList.length }}</text>
					</view>
				</u-swiper>
			</view>
			<view class="box">
				<view class="createInfo">
					<image :src="headUrl"></image>
					<view class="right">
						<view class="txt">{{object.realName}}</view>
						<view class="subtxt">
							<text>{{object.createDate.substring(0,10)}}</text><text>{{object.attractionName}}</text></view>
					</view>
				</view>
				<view class="mytitle">
					{{object.title}}
				</view>
				<view class="text-two" v-for="item,index in substrings ">
					{{item}}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				current: 0,
				picList: [],
				headUrl:'',
				h: uni.getSystemInfoSync().windowHeight - 57,
				mt: uni.getSystemInfoSync().statusBarHeight + 44,
				object: {

				},
				substrings: [],
			}
		},
		onLoad(opt) {
			let val = JSON.parse(opt.item);
				this.picList = val.pic;
			this.headUrl=JSON.parse(uni.getStorageSync('userInfo')).headUrl;
			console.log(val)
			this.object=val;
		
			this.substrings =val.content.split('\n');
		},
	}
</script>

<style lang="scss">
	
	.mytitle{
		width: 750rpx;
		height: 42rpx;
		font-size: 30rpx;
		font-family: PingFang-SC, PingFang-SC;
		font-weight: bold;
		color: #333333;
		line-height: 42rpx;
		margin-bottom:25rpx;
	}
	.text-two {
		font-size: 30rpx;
		color: #333333;
	
		view {
			margin: 12px 0;
		}
	}
	.box {
		padding: 30rpx 24rpx;

		.createInfo {
			display: flex;
			align-items: center;
			margin-bottom:25rpx;

			image {
				width: 72rpx;
				height: 72rpx;
				margin-right: 20rpx;

			}

			.txt {
				font-size: 30rpx;
				color: #111;
				line-height: 42rpx;
			}

			.subtxt {
				font-size: 24rpx;
				color: #999;
				line-height: 33rpx;

				text {
					margin-right: 24rpx;
				}
			}
		}
		.content{
			font-size: 28rpx;
			color: #333;
		}
	}
</style>